package com.pureut.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pureut.system.domain.ChangeApplication;
import com.pureut.system.domain.CompensationApplication;
import com.pureut.system.domain.SupplierAlterHistory;
import com.pureut.system.domain.SupplierList;
import com.pureut.system.domain.dto.SupplierListPageDto;
import com.pureut.system.domain.vo.SupplierListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: pureut
 * @Date: 2024-12-05 17:16:19
 * @Desc: 供应商名录
 */
@Mapper
public interface SupplierListMapper extends BaseMapper<SupplierList> {

    /**
     * 查询列表
     * @param supplierListVo
     * @return
     */
    List<SupplierListPageDto> selectByPage(SupplierListVo supplierListVo);

    /**
     * 供应商变更历史
     * @param supplierId
     * @return
     */
    List<ChangeApplication> getAlterHistoryList(String supplierId);

    /**
     * 新增供应商变更信息
     * @param changeApplication
     * @return
     */
    int saveChangeApplication(ChangeApplication changeApplication);

    /**
     * 插入审核历史
     * @param supplierAlterHistory
     * @return
     */
    int insertHis(SupplierAlterHistory supplierAlterHistory);

    /**
     * 供应商索赔
     * @param compensationApplication
     * @return
     */
    int supplierClaim(CompensationApplication compensationApplication);
}
